package com.example.demo.service;

import com.example.demo.mapper.BlogInfoMapper;
import com.example.demo.model.BlogInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogInfoService {
    @Autowired
    private BlogInfoMapper blogInfoMapper;

    public List<BlogInfo> getList() {
       return blogInfoMapper.selectAll();
    }

    public BlogInfo getBlogDetail(Integer blogId) {
      return   blogInfoMapper.selectById(blogId);
    }
}
